package cn.com.lms.business.examRewrite.persistence.repository;

import cn.com.lms.business.examRewrite.persistence.entity.ExerciseEmployeeReWriteVo;
import cn.com.lms.business.examRewrite.persistence.entity.UserReWrite;
import com.bnzj.core.persistence.repository.BaseRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserReWriteDao extends BaseRepository<UserReWrite,Long> {
    @Query(nativeQuery = true,value = "SELECT * FROM bnz_sys_user su JOIN (SELECT * FROM bnz_exam_exercise_employee WHERE exercise_id = ?1) as eee WHERE su.id = eee.employee_id")
    List<UserReWrite> getEmployeeById(Long id);
}
